package router

import (
	"getaway/middleware"
	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	r := gin.Default()
	// 全局注册行为追踪中间件
	r.Use(middleware.EnhancedBehaviorTracker())
	v1 := r.Group("/v1")
	{
		User(v1)
		AI(v1)
		Driver(v1) // 司机
		Order(v1)  // 订单
		Summerize(v1)
		Map(v1)
		Vehicle(v1)
		Base(v1)
		Financial(v1) // 财务
		Dispatch(v1)
	}
	return r
}
